/*!
 *  \file       WrapNumber.hpp
 *  \brief      Definizione della classe \c WrapNumber
 *  \author     Davide Scola <S2299453@studenti.unige.it>
 *  \author	Minetti Alberto <S3064777@studenti.unige.it>
 *  \version    1.0
 *
 */


#ifndef _WRAP_NUMBER_H
#define _WRAP_NUMBER_H

/*!
 *  \brief      Definizione della classe \c WrapNumber
 *
 *	Questa classe e' un wrapper che puo' contenere un altro tipo primitivo o una classe che abbia gli operatori definiti.
 *	Quindi e' possibile utilizzare maggiore o minore precisione a seconda dei casi di utilizzo.
 *
 */
template< typename numberType >
class WrapNumber {
    public :
        // Constructors
        WrapNumber( void );
        WrapNumber( const WrapNumber& );
        WrapNumber( const numberType );
        
        // Equals
        WrapNumber& operator=( const WrapNumber& );
        
        // Arithmetic
        WrapNumber  operator+( const WrapNumber& );
        WrapNumber  operator-( const WrapNumber& );
        WrapNumber  operator*( const WrapNumber& );
        WrapNumber  operator/( const WrapNumber& );
        
        WrapNumber& operator+=( const WrapNumber& );
        WrapNumber& operator-=( const WrapNumber& );
        WrapNumber& operator*=( const WrapNumber& );
        WrapNumber& operator/=( const WrapNumber& );
        
        // Relationship
        virtual bool operator==( const WrapNumber& ) const;
        bool operator!=( const WrapNumber& ) const;
        bool operator<( const WrapNumber& ) const;
        bool operator>( const WrapNumber& ) const;
        bool operator<=( const WrapNumber& ) const;
        bool operator>=( const WrapNumber& ) const;
	
	// Casting
	operator numberType( void ) const;
        
        // Getters / Setters
        numberType value( void ) const;
        
    protected :
        numberType number_;
};


template < typename numberType > std::ostream&
operator<< ( std::ostream&, const WrapNumber< numberType >& );

template < typename numberType > std::istream&
operator>> ( std::istream&, const WrapNumber< numberType >& );

#endif              /* _WRAP_NUMBER_H */
